export default {
    //登录返回数据
    login(datas) {
        const parm = JSON.parse(datas.body)
        console.log(parm)
        if (parm.username != 'admin') {
            return {
                code: 500,
                "msg": '用户名或密码错误',
                data: {}
            }
        }
        return {
            code: 200,
            msg:'登录成功',
            data: {
                "username": '张三丰',
                "token": 'rDkPvvAFV8kqwvKJzwlRv.i.q.wz1w1pz0SFsHn/55jNeZFQv/eCm',
                "expireTime": 1614226170000
            }
        }
    },
    //菜单列表
    getMenuList() {
        return {
            "code": 200,
            "data": {
                "authList": ["sys:user:edit", "sys:role:edit", "sys:menu:edit", "sys:user:delete", "sys:role:delete", "sys:menu:delete", "sys:user:add", "sys:role:add", "sys:menu:add", "sys:myApply", "sys:user:assign", "sys:role:assign", "sys:document", "sys:addDepartment", "sys:addGoodsCategory", "sys:myWaitToDo", "sys:addGoodsBrand", "sys:systemCode", "sys:manage", "sys:goodsCategory", "sys:editGoodsBrand", "sys:deploymentList", "sys:editDept", "sys:editGoodsCategory", "sys:dept", "sys:goodsBrand", "sys:goods", "sys:applyList", "sys:deleteDept", "sys:user", "sys:systenConfig", "sys:role", "sys:menu"],
                "menuList": [{
                    "children": [{
                        "children": [],
                        "code": "sys:dept",
                        "icon": "el-icon-copy-document",
                        "id": 33,
                        "isHome": 0,
                        "label": "机构管理",
                        "name": "departmentList",
                        "orderNum": 2,
                        "parentId": 17,
                        "path": "/departmentList",
                        "remark": "机构管理",
                        "type": "1",
                        "url": "/system/Department/DepartmentList"
                    }, {
                        "children": [],
                        "code": "sys:user",
                        "icon": "el-icon-s-custom",
                        "id": 18,
                        "isHome": 0,
                        "label": "用户管理",
                        "name": "userList",
                        "orderNum": 3,
                        "parentId": 17,
                        "path": "/userList",
                        "type": "1",
                        "url": "/system/User/UserList"
                    }, {
                        "children": [],
                        "code": "sys:role",
                        "icon": "el-icon-rank",
                        "id": 23,
                        "isHome": 0,
                        "label": "角色管理",
                        "name": "roleList",
                        "orderNum": 4,
                        "parentId": 17,
                        "path": "/roleList",
                        "type": "1",
                        "url": "/system/Role/RoleList"
                    }, {
                        "children": [],
                        "code": "sys:menu",
                        "icon": "el-icon-menu",
                        "id": 28,
                        "isHome": 0,
                        "label": "权限管理",
                        "name": "menuList",
                        "orderNum": 5,
                        "parentId": 17,
                        "path": "/menuList",
                        "type": "1",
                        "url": "/system/Menu/MenuList"
                    }],
                    "code": "sys:manage",
                    "icon": "el-icon-document",
                    "id": 17,
                    "isHome": 0,
                    "label": "系统管理",
                    "name": "system",
                    "orderNum": 1,
                    "parentId": 0,
                    "path": "/system",
                    "type": "0",
                    "url": "/system/system"
                }, {
                    "children": [{
                        "children": [],
                        "code": "sys:goodsCategory",
                        "icon": "el-icon-s-data",
                        "id": 36,
                        "isHome": 0,
                        "label": "分类管理",
                        "name": "goodCategory",
                        "orderNum": 1,
                        "parentId": 34,
                        "path": "/goodCategory",
                        "type": "1",
                        "url": "/goods/goodsCategory/goodsCategoryList"
                    }, {
                        "children": [],
                        "code": "sys:goodsBrand",
                        "icon": "el-icon-tickets",
                        "id": 37,
                        "isHome": 0,
                        "label": "品牌管理",
                        "name": "goodsBrand",
                        "orderNum": 2,
                        "parentId": 34,
                        "path": "/goodsBrand",
                        "type": "1",
                        "url": "/goods/goodsBrand/goodsBrandList"
                    }],
                    "code": "sys:goods",
                    "icon": "el-icon-picture",
                    "id": 34,
                    "isHome": 0,
                    "label": "商品管理",
                    "name": "",
                    "orderNum": 2,
                    "parentId": 0,
                    "path": "/goods",
                    "type": "0"
                }, {
                    "children": [{
                        "children": [],
                        "code": "sys:myApply",
                        "icon": "el-icon-edit-outline",
                        "id": 86,
                        "isHome": 0,
                        "label": "我的申请",
                        "name": "myApply",
                        "orderNum": 0,
                        "parentId": 42,
                        "path": "/myApply",
                        "type": "1",
                        "url": "/system/activiti/MyApply"
                    }, {
                        "children": [],
                        "code": "sys:document",
                        "icon": "el-icon-s-operation",
                        "id": 77,
                        "isHome": 0,
                        "label": "接口文档",
                        "name": "IFrame",
                        "orderNum": 0,
                        "parentId": 42,
                        "path": "/IFrame",
                        "type": "1",
                        "url": "http://localhost:8089/swagger-ui.html"
                    }, {
                        "children": [],
                        "code": "sys:myWaitToDo",
                        "icon": "el-icon-bank-card",
                        "id": 85,
                        "isHome": 0,
                        "label": "我的待办",
                        "name": "myWaitToDo",
                        "orderNum": 0,
                        "parentId": 42,
                        "path": "/myWaitToDo",
                        "type": "1",
                        "url": "/system/activiti/MyWaitToDo"
                    }, {
                        "children": [],
                        "code": "sys:systemCode",
                        "icon": "el-icon-files",
                        "id": 43,
                        "isHome": 0,
                        "label": "流程设计",
                        "name": "systemCode",
                        "orderNum": 0,
                        "parentId": 42,
                        "path": "/systemCode",
                        "type": "1",
                        "url": "/system/config/code"
                    }, {
                        "children": [],
                        "code": "sys:deploymentList",
                        "icon": "el-icon-date",
                        "id": 83,
                        "isHome": 0,
                        "label": "流程部署",
                        "name": "deploymentList",
                        "orderNum": 1,
                        "parentId": 42,
                        "path": "/deploymentList",
                        "type": "1",
                        "url": "/system/activiti/DeploymentList"
                    }, {
                        "children": [],
                        "code": "sys:applyList",
                        "icon": "el-icon-s-platform",
                        "id": 84,
                        "isHome": 0,
                        "label": "申请管理",
                        "name": "applyList",
                        "orderNum": 3,
                        "parentId": 42,
                        "path": "/applyList",
                        "type": "1",
                        "url": "/system/activiti/ApplyList"
                    }],
                    "code": "sys:systenConfig",
                    "icon": "el-icon-receiving",
                    "id": 42,
                    "isHome": 0,
                    "label": "系统工具",
                    "name": "systenConfig",
                    "orderNum": 3,
                    "parentId": 0,
                    "path": "/systenConfig",
                    "type": "0",
                    "url": "/system/systenConfig"
                }],
                "routerList": [{
                    "children": [],
                    "code": "sys:myApply",
                    "icon": "el-icon-edit-outline",
                    "id": 86,
                    "isHome": 0,
                    "label": "我的申请",
                    "name": "myApply",
                    "orderNum": 0,
                    "parentId": 42,
                    "path": "/myApply",
                    "type": "1",
                    "url": "/system/activiti/MyApply"
                }, {
                    "children": [],
                    "code": "sys:document",
                    "icon": "el-icon-s-operation",
                    "id": 77,
                    "isHome": 0,
                    "label": "接口文档",
                    "name": "IFrame",
                    "orderNum": 0,
                    "parentId": 42,
                    "path": "/IFrame",
                    "type": "1",
                    "url": "http://localhost:8089/swagger-ui.html"
                }, {
                    "children": [],
                    "code": "sys:myWaitToDo",
                    "icon": "el-icon-bank-card",
                    "id": 85,
                    "isHome": 0,
                    "label": "我的待办",
                    "name": "myWaitToDo",
                    "orderNum": 0,
                    "parentId": 42,
                    "path": "/myWaitToDo",
                    "type": "1",
                    "url": "/system/activiti/MyWaitToDo"
                }, {
                    "children": [],
                    "code": "sys:systemCode",
                    "icon": "el-icon-files",
                    "id": 43,
                    "isHome": 0,
                    "label": "流程设计",
                    "name": "systemCode",
                    "orderNum": 0,
                    "parentId": 42,
                    "path": "/systemCode",
                    "type": "1",
                    "url": "/system/config/code"
                }, {
                    "children": [],
                    "code": "sys:goodsCategory",
                    "icon": "el-icon-s-data",
                    "id": 36,
                    "isHome": 0,
                    "label": "分类管理",
                    "name": "goodCategory",
                    "orderNum": 1,
                    "parentId": 34,
                    "path": "/goodCategory",
                    "type": "1",
                    "url": "/goods/goodsCategory/goodsCategoryList"
                }, {
                    "children": [],
                    "code": "sys:deploymentList",
                    "icon": "el-icon-date",
                    "id": 83,
                    "isHome": 0,
                    "label": "流程部署",
                    "name": "deploymentList",
                    "orderNum": 1,
                    "parentId": 42,
                    "path": "/deploymentList",
                    "type": "1",
                    "url": "/system/activiti/DeploymentList"
                }, {
                    "children": [],
                    "code": "sys:dept",
                    "icon": "el-icon-copy-document",
                    "id": 33,
                    "isHome": 0,
                    "label": "机构管理",
                    "name": "departmentList",
                    "orderNum": 2,
                    "parentId": 17,
                    "path": "/departmentList",
                    "remark": "机构管理",
                    "type": "1",
                    "url": "/system/Department/DepartmentList"
                }, {
                    "children": [],
                    "code": "sys:goodsBrand",
                    "icon": "el-icon-tickets",
                    "id": 37,
                    "isHome": 0,
                    "label": "品牌管理",
                    "name": "goodsBrand",
                    "orderNum": 2,
                    "parentId": 34,
                    "path": "/goodsBrand",
                    "type": "1",
                    "url": "/goods/goodsBrand/goodsBrandList"
                }, {
                    "children": [],
                    "code": "sys:applyList",
                    "icon": "el-icon-s-platform",
                    "id": 84,
                    "isHome": 0,
                    "label": "申请管理",
                    "name": "applyList",
                    "orderNum": 3,
                    "parentId": 42,
                    "path": "/applyList",
                    "type": "1",
                    "url": "/system/activiti/ApplyList"
                }, {
                    "children": [],
                    "code": "sys:user",
                    "icon": "el-icon-s-custom",
                    "id": 18,
                    "isHome": 0,
                    "label": "用户管理",
                    "name": "userList",
                    "orderNum": 3,
                    "parentId": 17,
                    "path": "/userList",
                    "type": "1",
                    "url": "/system/User/UserList"
                }, {
                    "children": [],
                    "code": "sys:role",
                    "icon": "el-icon-rank",
                    "id": 23,
                    "isHome": 0,
                    "label": "角色管理",
                    "name": "roleList",
                    "orderNum": 4,
                    "parentId": 17,
                    "path": "/roleList",
                    "type": "1",
                    "url": "/system/Role/RoleList"
                }, {
                    "children": [],
                    "code": "sys:menu",
                    "icon": "el-icon-menu",
                    "id": 28,
                    "isHome": 0,
                    "label": "权限管理",
                    "name": "menuList",
                    "orderNum": 5,
                    "parentId": 17,
                    "path": "/menuList",
                    "type": "1",
                    "url": "/system/Menu/MenuList"
                }]
            },
            "msg": "查询成功"
        }
    }
}